<html>
<head>
<script type="text/javascript">



var tmrID1;
var tmrID2;



function setTimer1(){
   clearTimeout(tmrID1); 
   tmrID1=setTimeout(doajax,4000);
}
function setTimer(){
   // doajax();
   clearTimeout(tmrID2); 
   tmrID2=setTimeout(change_div,10000);
}

function doajax(){
  alert(1);
  setTimer1();
}

function change_div(){
  alert(2);
  setTimer();
}

function doReady(){
   setTimer();
   setTimer1();
}
</script>
</head>
<body onLoad="doReady()">
</body>
</html>